package reflect;

import reflect.annotations.AutoRunMethod;

import java.lang.reflect.Method;

public class ReflectDemo11 {
    public static void main(String[] args) throws NoSuchMethodException, ClassNotFoundException {
        Class cls=Class.forName("reflect.Person");
        Method method = cls.getDeclaredMethod("sayHello");

        boolean mark = method.isAnnotationPresent(AutoRunMethod.class);
        System.out.println("是否被标注:"+mark);
    }
}
